package com.ofcoder.algorithmsamples.seata.starter;

import com.ofcoder.algorithmsamples.seata.ApplicationKeeper;
import com.ofcoder.algorithmsamples.seata.dubbo.api.AccountService;
import com.ofcoder.algorithmsamples.seata.dubbo.api.OrderService;
import com.ofcoder.algorithmsamples.seata.dubbo.api.StorageService;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @author: lyy
 * created in 2021/5/27
 */
public class OrderStarter {
    public static void main(String[] args) {

        ClassPathXmlApplicationContext accountContext = new ClassPathXmlApplicationContext(new String[]{"spring/dubbo-order-service.xml"});
        OrderService orderService = accountContext.getBean(OrderService.class);
        orderService.buy("U100001","C00321",1);
        new ApplicationKeeper(accountContext).keep();
    }

}
